//
//  RecentChat.m
//  DDKelai
//
//  Created by Admin on 15/10/15.
//  Copyright (c) 2015年 chenwenhao. All rights reserved.
//

#import "RecentChat.h"
#import "RecentChatConfig.h"

@implementation RecentChat

//将FMResultSet对象转换成RecentConcactData对象
+ (RecentChat *)recentConcactDataFromDB:(FMResultSet *)rs
{
    RecentChat *recentChat = [[RecentChat alloc] init];
    recentChat.friendLogo = [rs stringForColumn:RC_friendLogo];

    recentChat.friendid = [rs stringForColumn:RC_friendid];
    
    recentChat.friendName = [rs stringForColumn:RC_friendName];

    recentChat.newerMsg = [rs stringForColumn:RC_newerMsg];
    recentChat.displayMsg = [rs stringForColumn:RC_displayMsg];
    
    recentChat.unreadCount = [rs intForColumn:RC_unreadCount];
    recentChat.updateTime = [rs stringForColumn:RC_updateTime];
    

    
    recentChat.msgSourceType = [rs intForColumn:RC_msgSourceType];
    recentChat.msgBodyType = [rs intForColumn:RC_msgBodyType];
    recentChat.msgState = [rs intForColumn:RC_msgState];

    recentChat.userData = [rs stringForColumn:RC_userData];
    
    return recentChat;
}

@end
